<template>
 <div>
<button v-on:click="fn">点击</button>
<button v-on:click="fn1(10)">传参点击</button>
<button v-on:click="fn1(10)">直接写简单的代码</button>
 </div>
</template>

<script>
 export default {
  
   data () {
     return {
        num:0,
     }
   },
   methods: {
    fn(){
        console.log(1);
    },
    fn1(a){
    console.log(a);
   }
   },
 }
</script>

<style scoped lang='less'>

</style>